package com.easyidea.its.domain.model.surveillance;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * 
 * @author kangning.hu
 * 
 */
@Entity
@Table(name = "Alarm")
public class Alarm {

	private Integer alarmId;// 布控ID smallint 10
	private String recognitionPlateNumber;// 识别号牌号码 nvarchar 24
	private String passPortName;// 报警卡口名称 nvarchar 64
	private String direction;// 方向 nvarchar 64
	private Date alarmDate;// 报警时间 datetime 10
	private boolean dealWith = false;//是否以处理
	private String realPlateNumber;

	private Surveillance surveillance;

	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "surveillanceID", referencedColumnName = "surveillanceID")
	public Surveillance getSurveillance() {
		return surveillance;
	}

	@Id
	@Column(name = "alarmId")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return alarmId;
	}

	@Column(name = "recognitionPlateNumber")
	public String getRecognitionPlateNumber() {
		return recognitionPlateNumber;
	}

	@Column(name = "passPortName")
	public String getPassPortName() {
		return passPortName;
	}

	@Column(name = "direction")
	public String getDirection() {
		return direction;
	}



	@Column(name = "alarmDate")
	public Date getAlarmDate() {
		return alarmDate;
	}

	public void setId(Integer alarmId) {
		this.alarmId = alarmId;
	}

	public void setRecognitionPlateNumber(String recognitionPlateNumber) {
		this.recognitionPlateNumber = recognitionPlateNumber;
	}

	public void setPassPortName(String passPortName) {
		this.passPortName = passPortName;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}

	public void setAlarmDate(Date alarmDate) {
		this.alarmDate = alarmDate;
	}

	public void setSurveillance(Surveillance surveillance) {
		this.surveillance = surveillance;
	}
	@Column(name = "is_dealWith",nullable=false)
	public boolean isDealWith() {
		return dealWith;
	}

	public void setDealWith(boolean dealWith) {
		this.dealWith = dealWith;
	}

	public String getRealPlateNumber() {
		return realPlateNumber;
	}

	public void setRealPlateNumber(String realPlateNumber) {
		this.realPlateNumber = realPlateNumber;
	}

}
